//
//  CTMessageView.h
//  ConstellationTalk_0.1
//
//  Created by riley on 15/5/23.
//  Copyright (c) 2015年 riley chu. All rights reserved.
//

#import <UIKit/UIKit.h>
@class CTMessageListItem;
@class CTOfficialMessageItem;


typedef enum {
    CTMessageViewTypePersonal = 1,
    CTMessageViewTypeOfficial
}CTMessageViewType;

@protocol CTMessageViewDelegate;

@interface CTMessageView : UIView

@property(nonatomic,setter=setPersonalMessageArr:)NSArray * personalMessageListArr;
@property(nonatomic,setter=setOfficialMessageArr:)NSArray * officialMessageListArr;
@property(nonatomic,assign)id<CTMessageViewDelegate>delegate;

-(void)viewWillShow;
-(void)refresh;
-(void)refreshPullDownEnd;
-(void)refreshPullUpEnd;

-(void)reloadData;


@end

@protocol CTMessageViewDelegate <NSObject>

-(void)refreshPersonalMesgControlPullDown:(CTMessageView *)view;
-(void)refreshPersonalMesgControlPullUp:(CTMessageView *)view;
-(void)personalImageClicked:(CTMessageView *)view withItem:(CTMessageListItem *)itm;


-(void)clearAction:(CTMessageView *)view
          withType:(CTMessageViewType)type;

-(void)selectPersonalMessageItemAction:(CTMessageView *)view withItem:(CTMessageListItem *)itm;
-(void)removePersonalMessageItemAction:(CTMessageView *)view withItem:(CTMessageListItem *)itm;
-(void)selectOfficialMessageItemAction:(CTMessageView *)view withItem:(CTOfficialMessageItem *)itm;
-(void)removeOfficialMessageItemAction:(CTMessageView *)view withItem:(CTOfficialMessageItem *)itm;

@end